<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@ taglib prefix="c"
           uri="http://java.sun.com/jsp/jstl/core" %>

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="renderer" content="webkit">
    <title>新项目管理后台</title>

    <script src="/starCms/js/jquery.min-2.2.4.js"></script>

    <script src="/starCms/js/bootstrap.min.js"></script>
    <link rel="stylesheet" href="/starCms/css/bootstrap.min.css" />

    <link rel="stylesheet" href="/starCms/css/metisMenu.min.css">
    <script src="/starCms/js/metisMenu.min.js"></script>

    <link rel="stylesheet" href="/starCms/css/bootstrap-table.min.css" />
    <script src="/starCms/js/bootstrap-table.min.js"></script>
    <script src="/starCms/js/bootstrap-table-zh-CN.min.js"></script>
    <script src="/starCms/js/boostrap-table/plugins/bootstrap-table-export.js"></script>
    <script src="/starCms/js/boostrap-table/plugins/tableExport.js"></script>

    <link rel="stylesheet" href="/starCms/css/ems/mm-vertical.css">
    <link href="/starCms/css/ems/ems_tab.css" rel="stylesheet">
    <link href="/starCms/css/ems/home.css" rel="stylesheet">


</head>
<body>

<div class="clearfix ems_main_frame">

    <%--左边部分--%>
    <div class="clearfix ems_frame_left">
        <div class="ems_main_menu_info">
            <div class="clearfix ems_logo_div">
                <div class="ems_logo" style="margin: 0 auto">
                    <img src="http://cdn.zmzcloud.com/20710923408296下载6.jpg">
                </div>
                <div class="menu-scale">
                    <span class="glyphicon glyphicon-list" aria-label="true"></span>
                </div>
            </div>
            <div class="ems_welcome">欢迎您，<span class="glyphicon glyphicon-user"></span><a>  管理员</a></div>
        </div>

        <div class="ems_main_menu">
            <nav class="sidebar-nav"></nav>
        </div>
    </div>

    <%--右边部分--%>
    <div class="ems_frame_right">
        <div class="ems_main_menu_tab">
            <div class="tab_direction_backward"><i class="glyphicon glyphicon-backward"></i></div>
            <div class="ems_main_content_tab">
                <div class="ems_main_content_tab_float">
                    <div class="ems_tab_div tab_active">首页</div>
                </div>
                <div class="clear"></div>
            </div>
            <div class="tab_direction_forward"><i class="glyphicon glyphicon-forward"></i></div>
        </div>

        <div class="ems_main_content_wrap">
            <div class="ems_main_content">
                <div class="ifm-div" id="home_page">
                    <iframe class=""
                    id="page_content_0"
                    width="100%"
                    height="100%"
                    src="/starCms/show"
                    frameborder="0">
                    </iframe>
                </div>

            </div>
        </div>
    </div>
</div>

<script src="/starCms/js/ems/ems_menu.js"></script>
<script>

    $(function () {
        $(document).createMenus('${menuJson}');
        $('#ems_menu').metisMenu();

        $(".menu-scale").data("left_width",50)
            .data("left_html",getIconList());


        $(".menu-scale").on("click",function () {
            var leftFrame = $(".ems_frame_left");
            var $that = $(this);
            var width = leftFrame.width();
            var html = leftFrame.find("#ems_menu").html();
            leftFrame.animate({width:$(this).data("left_width")},"1500",function () {
                $("#ems_menu").html($that.data("left_html"));
                $(".menu-scale").data("left_html",html);
                if ($(".ems_logo,.ems_welcome").is(":hidden")) {
                    $(".ems_logo,.ems_welcome").show();
                    $('#ems_menu').metisMenu();
                    initMenu();
                }else {
                    $(".ems_logo,.ems_welcome").hide();
                    $("#ems_menu").metisMenu('dispose');
                }
            })
            $(".menu-scale").data("left_width",width);

        })

        function getTopHtml() {
            return '<div class="clearfix ems_logo_div"><div class="menu-scale"><span class="glyphicon glyphicon-list" aria-label="true"></span></div></div>';
        }

        function getIconList() {
            var html = [];
            $("#ems_menu>li>a").each(function (index,value) {
                var iclass = $(value).find("i").attr("class");
                html.push('<li class><a href="#" aria-expanded="false"><i class="'+iclass+'"></i></a></li>')
            });
           return html.join("");
        }
    });
</script>

<script src="/starCms/js/ems/ems_tab.js"></script>
</body>
</html>